package com.githan.bootsecurity.controller;

import com.alibaba.fastjson.JSON;
import com.githan.bootsecurity.entity.SysUserRole;
import com.githan.bootsecurity.service.SysUserRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author https://github.com/Han56
 * @date 2021/4/10 11:11
 */
@RestController
public class SysUserRoleController {
    @Autowired
    SysUserRoleService sysUserRoleService;

    @GetMapping("/matchInfo")
    public String matchInfo(){
        List<SysUserRole> info = sysUserRoleService.getAllMatchInfo();
        String testJson= JSON.toJSONString(info);
        System.out.println("匹配角色认证信息:"+testJson);
        return testJson;
    }
}
